#include <iostream>
#include <vector>
using namespace std;

int main()
{
    unsigned int na,nb,nc;
    vector<string> A,B,C;
    string sin;
    while(cin>>na>>nb>>nc)
    {
        A.clear();
        B.clear();
        C.clear();
        int i = 0;
        while(i++<na)
        {
            cin>>sin;
            A.push_back(sin);
        }

        i = 0;
        while(i++<nb)
        {
            cin>>sin;
            B.push_back(sin);
        }

        i = 0;
        while(i++<nc)
        {
            cin>>sin;
            C.push_back(sin);
        }

        for(vector<string>::iterator vi = B.begin(),vend = B.end(); vi != vend; ++vi)
        {
            for(int k = 0; k < nc; ++k)
            {
                if(*vi == C[k])
                {
                    B.erase(vi);
                }
            }
        }

        i = 0;
        for(vector<string>::iterator vi = B.begin(),vend = B.end(); vi != vend; ++vi)
        {
            for(int k = 0; k < na; ++k)
            {
                if(*vi == A[k])
                {
                    i++;
                    if(i!=1)
                        cout<<" "<<*vi;
                    else
                        cout<<*vi;
                }
            }
        }
        if(i == 0)
            cout<<"No enemy spy"<<endl;
        else
            cout<<endl;
    }

    return 0;
}